licenses(["notice"])

package(default_visibility = ["//visibility:public"])

cc_library(
    name = "cluster-in-memory_main_lib",
    srcs = ["cluster-in-memory_main.cc"],
    deps = [
        ":config_cc_proto",
        ":in-memory-clusterer",
        "//clustering/clusterers:all-clusterers",
        "//external:gflags",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/flags:flag",
        "@com_google_absl//absl/flags:parse",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/status:statusor",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/strings:str_format",
        "@com_google_protobuf//:protobuf",
        "@gbbs//gbbs:edge_map_blocked",
    ],
)

cc_binary(
    name = "cluster-in-memory_main",
    deps = [
        "cluster-in-memory_main_lib",
        "//clustering/clusterers:all-clusterers",
        "//external:gflags",
    ],
)

proto_library(
    name = "config_proto",
    srcs = [
        "config.proto",
    ],
    deps = [
        "//clustering/util:dynamic_weight_threshold_proto",
    ],
)

cc_proto_library(
    name = "config_cc_proto",
    deps = [":config_proto"],
)

cc_library(
    name = "status_macros",
    hdrs = ["status_macros.h"],
    deps = [
        "@com_google_absl//absl/base",
    ],
)

cc_library(
    name = "in-memory-clusterer",
    srcs = ["in-memory-clusterer.cc"],
    hdrs = ["in-memory-clusterer.h"],
    deps = [
        ":config_cc_proto",
        ":status_macros",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/memory",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/status:statusor",
        "@com_google_absl//absl/strings",
    ],
)

cc_library(
    name = "gbbs-graph",
    srcs = ["gbbs-graph.cc"],
    hdrs = ["gbbs-graph.h"],
    deps = [
        ":in-memory-clusterer",
        ":status_macros",
        "@com_google_absl//absl/base",
        "@com_google_absl//absl/container:flat_hash_map",
        "@com_google_absl//absl/status",
        "@com_google_absl//absl/strings",
        "@com_google_absl//absl/synchronization",
        "@com_google_absl//absl/types:optional",
        "@gbbs//gbbs",
        "@gbbs//gbbs:graph",
        "@gbbs//gbbs:macros",
    ],
)
